total = 150

func_fmt = """
template <typename T1%(temp_type)s>
inline int TextFormatString(std::string &str, const char* format, T1 p1%(temp_param)s) {
	BEGINE_STRING_FORMAT();
	if (!_InternalSafeFormat(format, 
		class_type<T1>::type,%(class_type)s 
		Type_end)) NOT_SAFE_HANDLE();
	return _InternalCallVHelper(str, format, p1%(func_param)s);
}
"""

temp_type_fmt = ", typename T%d"
temp_param_fmt = ", T%d p%d"
class_type_fmt = " class_type<T%d>::type,"
func_param_fmt = ", p%d"

temp_type = temp_param = class_type = func_param = ""

for x in range(2, total):
	temp_type += temp_type_fmt % (x)
	temp_param += temp_param_fmt % (x, x)
	class_type += class_type_fmt % (x)
	func_param += func_param_fmt % (x)

	dic = {"temp_type":temp_type, "temp_param":temp_param, "class_type":class_type, "func_param":func_param}
	print(func_fmt % dic)
